<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
  <title>Thrive Mobile Application</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

  <!--- Some jquery stuff --->
	<link rel="stylesheet" href="../../scripts/jquery.mobile-1.0.1/jquery.mobile-1.1.0-rc.1.min.css" type="text/css" />
    <link rel="stylesheet" href="../../scripts/jquery.mobile-1.0.1/thrive-theme.css" type="text/css">
    <script src="../../scripts/jquery.mobile-1.0.1/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script src="../../scripts/Thrive.js"  type="text/javascript"></script>
    <script src="../AccountControl/AccountControl.js" type="text/javascript"></script>
    <script src="Gather.js" type="text/javascript"></script>
    <script src="../../scripts/jquery.mobile-1.0.1/jquery.mobile-1.1.0-rc.1.min.js" type="text/javascript"></script>
    <link rel="stylesheet" href="../../css/style.css" type="text/css" />
</head>

<body>
    
    <div data-role="page" id="gather" data-theme="a">
    
    <script>
    	$("#gather").live('pagecreate', function() {
			gather_prefetch();
		});
		
		$(".popup_container").live('click', function() {
			removePopup();
		});
		
		$(".popup_container").live('tap', function() {
			removePopup();
		});
		
		$(".popup_container").bind('touchstart', function()  {
			removePopup();
		});
		
		$("#gather_text-0").live('click', function() {
			if($("#gather_text-0").val() == "Good thing #1"){
				$("#gather_text-0").val("");
			}
		});
		
		$("#gather_text-1").live('click', function() {
			if($("#gather_text-1").val() == "Good thing #2"){
				$("#gather_text-1").val("");
			}
		});
		
		$("#gather_text-2").live('click', function() {
			if($("#gather_text-2").val() == "Good thing #3"){
				$("#gather_text-2").val("");
			}
		});
		
		$("#submit_gather").live('click', function() {
			sendGather();
		});
	</script>
    
    <div data-role="header" data-theme="a">
    	<a href="../../index.html" data-role="button" data-icon="arrow-l">Thrive</a>
        <h1>Gather</h1>
        <a href="info.html" data-icon="info">Info</a>
    </div>
    
    <div class="popup_container" style="display:none;">
        <div class="popup"></div>
    </div>
    
    <div data-role="content" data-theme="a">
        <form id="gather_form" selected="true">
            <fieldset>
                <div class="row"><p>Most days have a mix of things that happen. Today what are some good things that happened to you?</p>
                </div>
            
                <div class="row">
                    <textarea id="gather_text-0" name="gather0" maxlength="600">Good thing #1</textarea>
                </div>
                
                <div class="row">
                    <textarea id="gather_text-1" name="gather1" maxlength="600">Good thing #2</textarea>
                </div>
                
                <div class="row">
                    <textarea id="gather_text-2" name="gather2" maxlength="600">Good thing #3</textarea>
                </div>
            </fieldset>
            <a id="submit_gather" type="submit" data-role="button">Submit</a>
        </form>
    </div>
    </div>
</body>

</html>
